# vim: set ft=python

exec_name = 'krt' 

base_env = Environment(CCFLAGS='-Wall -pedantic')
debug_env = base_env.Clone(CCFLAGS='-g -D_DEBUG')
release_env = base_env.Clone(CCFLAGS='-DNDEBUG -O3 -march=i686')
profile_env = release_env.Clone(CCFLAGS='-pg', LINKFLAGS='-pg')

env = debug_env
if ARGUMENTS.get('release', '0') == '1':
	env = release_env
if ARGUMENTS.get('profile', '0') == '1':
	env = profile_env
	
Tool('mingw')(env)

program = env.Program(exec_name, Glob('*.cpp'))
output = str(program[0])
Return('output')

